﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace App
{
    public class DisplayTabControlHelper
    {
        public DisplayTabControlHelper(TabControl tabControl)
        {
            tabCtrl = tabControl;
            //tabCtrl.ItemSize = Size.Empty;
            //tabCtrl.
            if (tabControl.Parent != null)
            {
                tabControl.Parent.Resize += new EventHandler(Parent_Resize);
            }
        }

        TabControl tabCtrl;

        void Parent_Resize(object sender, EventArgs e)
        {
            //tabCtrl.Region = new Region(new Rectangle(tabCtrl.Left, tabCtrl.Top, tabCtrl.Width, tabCtrl.Height));
            //tabCtrl.TabPages[0].Top
            //if (tabCtrl.TabPages.Count > 0)
            //{
            //    tabCtrl.Region = new Region(new Rectangle(
            //        tabCtrl.TabPages[0].Left,
            //        tabCtrl.TabPages[0].Top,
            //        tabCtrl.Width,
            //        tabCtrl.Height));
            //}
        }


    }
}
